﻿String.prototype.Pluralize = function Pluralize()
{
	if (this.charAt(this.length - 1) == "y")
		return this.substr(0, this.length - 1) + "ies";
	if (this.charAt(this.length - 1) == "Y")
		return this.substr(0, this.length - 1) + "IES";

	if (this.charAt(this.length - 1) == "h")
		return this + "es";
	if (this.charAt(this.length - 1) == "h")
		return this + "ES";

	if (this.charAt(this.length - 1) >= "A" && this.charAt(this.length - 1) <= "Z")
		return this + "S";
	return this + "s";
}
